$(shell mkdir -p bin)
.PHONY: hello
hello: bin/main bin/main1 bin/string bin/list bin/set bin/hset bin/zset

SRC=src/main.cc
OBJ=main
LIBPATH= -L/home/jiangbo/redis_project/redis-plus-plus-master/build -Lx86_64-linux-gnu
INCLUDE= -Iinclude

CFLAG=-lredis++ -lhiredis $(INCLUDE) $(LIBPATH) -Wl,-rpath,$(LIBPATH) -pthread 

bin/$(OBJ): $(SRC)
	g++ src/main.cc -o bin/main $(CFLAG) -std=c++17

bin/main1: src/main1.cc
	g++ src/main1.cc -o bin/main1 $(CFLAG) -std=c++17

bin/string: src/string.cc
	g++ src/string.cc -o bin/string $(CFLAG) -std=c++17

bin/list: src/list.cc
	g++ src/list.cc -o bin/list $(CFLAG) -std=c++17

bin/set: src/set.cc
	g++ src/set.cc -o bin/set $(CFLAG) -std=c++17

bin/hset: src/hset.cc
	g++ src/hset.cc -o bin/hset $(CFLAG) -std=c++17


bin/zset: src/zset.cc
	g++ src/zset.cc -o bin/zset $(CFLAG) -std=c++17

.PHONY:clean
clean:
	rm -rf bin

